From 3ed2ca517aa5f2424f238817844d8a8eb98e64c2 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 15 Dec 2023 15:47:58 +0000 Subject: Implement int ops in runtime --- ...ng.compiler.testing.snapshots.Snapshotter)].expected | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenPushIntTests]/[method:pushIntInstructionGeneratesIntGetInstruction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected') diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenPushIntTests]/[method:pushIntInstructionGeneratesIntGetInstruction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenPushIntTests]/[method:pushIntInstructionGeneratesIntGetInstruction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected index 524c5179..24502c39 100644 --- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenPushIntTests]/[method:pushIntInstructionGeneratesIntGetInstruction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenPushIntTests]/[method:pushIntInstructionGeneratesIntGetInstruction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -1,22 +1,19 @@ Compilation unit elements: +( + function-decl + "shed__runtime__int_create" + params=((param "value" int)) + return-type=int +) Locals: * (val "int__0" int) - * (val "intPointer__0" data-ptr) Instructions: ( - (alloc-heap (local "intPointer__0") (struct (int))) - ( - memory-store - pointer=(local "intPointer__0") - layout=(struct (int)) - offset=(0) - value=(int 42) - ) - (data-ptr-to-int (local "int__0") (local "intPointer__0")) + (call (local "int__0") "shed__runtime__int_create" ((int 42))) ) Temporary stack: -- cgit v1.2.3